<!DOCTYPE html>
<html>
<head>
<title>系统配置管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<#include "../../../include/resources.html">
<script type="text/javascript">

	<@fieldFormatter field="status" bean="com.huatech.domain.SystemConfig"/>

    var dataGrid;
    var winWidth =  900;
    var winHeight = 500;
    
    var modifyTitle = "系统配置编辑";
    var modifyUrl =  "/modules/system/config/modify.html";

	var viewWidth = 900;
	var viewHeight = 500;
	var detailUrl = "/modules/system/config/view.html";
	var detailTitle = "系统配置详情";
    
	
    var addUrl  = "/modules/system/config/append.html";
    var addTitle ="添加系统配置";

    $(function() {
        dataGrid = $('#dataGrid').datagrid({
            url : '/modules/system/config/manageList.html',
            fit : true,
            fitColumns : true, 
            border : false,
            pagination : true,
            idField : 'id',
            pageSize : pageSize,
            pageNums :1,
            pageList : pageList,
            sortName : 'id',
            sortOrder : 'asc',
            checkOnSelect : false,
            selectOnCheck : false,
            nowrap : false,
			singleSelect:true,
            columns : [ [
			  { field: 'id', title: '编号',width: 50, sortable:false },              
			  { field: 'configCode', title: '配置标示',width: 90,  sortable:false },
			  { field: 'configValue', title: '配置值',width: 90,  sortable:false },
              { field: 'status', title: '状态', width: 90, sortable:false, formatter:statusFormatter},
              { field: 'createTime', title: '创建时间', width: 90, sortable:false},
              { field : 'action',
                title : '操作',
                width :75,
                fixed:true,
                align:'center',
                formatter : function(value, row, index) {
                	var str = '';
                  	str += '<dl>';
                  	str += '<dt><a href="javascript:void(0);" onclick="$.fn.formOptions.viewFun('+row.id+',detailTitle,viewWidth,viewHeight,detailUrl);" title="'+detailTitle+'">查看</a><i class="iconfont">&#xe639;</i></dt>' ;
				 	str += '<dd>';
				  	str += '<a href="javascript:void(0);" onclick="$.fn.dataGridOptions.editFun('+row.id+',modifyTitle,winWidth,winHeight,modifyUrl);" title="'+modifyTitle+'">编辑</a>';
					str += '</dd>' ;
                  	str +=  '</dl>' ;
                  	return str;
                }
            } ] ]
        });
    });
</script>
</head>
<body style="padding:0 20px;" >
     <div class="easyui-layout" data-options="fit : true,border : false">
        <div data-options="region:'north',border:false,collapsible:false" id="searchBox">
        	<div class="sLeft">
	            <form id="searchForm">
	            	<input type="text"  name="keywords" id="keywords" class="sInput" placeholder="输入配置标示、配置值进行搜索" autocomplete="off" onkeydown="if(event.keyCode == 13){ $.fn.dataGridOptions.searchFun('#searchForm');return false;}"/><a href="javascript:;" title="查询" class="sBtn" onclick="$.fn.dataGridOptions.searchFun('#searchForm');">查询</a><a href="javascript:;" class="advBtn" title="条件查询">条件查询 <i class="iconfont">&#xe638;</i></a>
                    <a href="javascript:void(0);" class="reloadIcon" onclick="dataGrid.datagrid('reload');" title="刷新" ><i class="iconfont">&#xe603;</i></a>
	            </form>
            </div>
            <div class="sRight">
				<a onclick="$.fn.dataGridOptions.addFun(-1,addTitle,winWidth,winHeight,addUrl);" href="javascript:void(0);" class="addBtn"><i class="iconfont">&#xe629;</i>添加</a>&nbsp;&nbsp;&nbsp;
				<a target="_blank" class="btn btn-info" onclick="exportExcel(this)" data-title='系统配置' data-url="/modules/system/config/export.html" >导出</a>&nbsp;&nbsp;&nbsp;
					
            </div>
            <form id="showAdw">
		        <ul class="showAdw" style="display:none;">
		        	<a href="javascript:void(0);"><i class="iconfont closeWin">&#xe63a;</i></a>
		        	<li><span>配置标示</span><input type="text" name="configCode" id="configCode"/></li>
		       		<li><span>&nbsp;</span><a href="javascript:void(0);" class="searchBtn sureBtn" onclick="$.fn.dataGridOptions.searchFun('#showAdw');">确定</a><a href="javascript:void(0);" class="searchBtn" onclick="$.fn.dataGridOptions.cleanFun('#searchForm');">重置</a></li>
		        </ul>
	        </form>
        </div>
        <div data-options="region:'center'" style="margin-top:30px;padding-bottom:30px;">
            <table id="dataGrid"></table>
        </div>
    </div>
     
</body>
</html>
<script src="${theme_dir}/resources/js/search.js"></script>